#ifndef _LCD_H_
#define _LCD_H_
#include "Global.h"

typedef struct 
{
    uint8 ICON_USER:1;
    uint8 ICON_USER1:1;
    uint8 ICON_USER2:1;
    uint8 ICON_WEIZHI:1;
    uint8 ICON_JIENENG:1;
    uint8 ICON_JIENENG_KAI:1;
    uint8 ICON_YEDENG_KAI:1;
    uint8 ICON_YEDENG:1;
    
    uint8 ICON_SHUIWEN:1;   
    uint8 ICON_ZUOWEN:1;
    uint8 ICON_FENGWEN:1;
    uint8 ICON_SHUIYA:1;
    uint8 Dig2_h:4;

    uint8 Dig2_l:4;
    uint8 Dig1_h:4;

    uint8 Dig1_l:4;
    uint8 reversed2:4;


}Typedef_LCD_RAM;

typedef union 
{
    Typedef_LCD_RAM Detail;
    uint8 Buf[sizeof(Typedef_LCD_RAM)];
}U_LCD_RAM;

extern U_LCD_RAM  LCD_Ram;

#define LCD_ALL_ON  0xFF
#define LCD_ALL_OFF 0x00
#define DISP_OFF    10

// enum
// {
//     ICON_SHUIWEN,
//     ICON_ZUOWEN,
//     ICON_FENGWEN,
//     ICON_SHUIYA,
//     ICON_PENZUIQINGXI,
//     ICON_YEDENG,
//     ICON_JIEDIAN,
//     ICON_WEIZHI,
// };

#define ICON_OFF()      do{LCD_Ram.Buf[0]=0;    LCD_Ram.Buf[1]&=0xF0; }while(0)
#define ICON_ALL_ON()   do{LCD_Ram.Buf[0]=0xFF; LCD_Ram.Buf[1]|=0x0F; }while(0)

void initLCD(uint8 initValue);
void LCD_DisplayDigi(uint8 digi_h, uint8 digi_l);
void DeInitLCD(void);

#endif